package com.zcf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.zcf.common.json.Body;
import com.zcf.pojo.Gametea;
import com.zcf.pojo.RoomsParam;
import com.zcf.pojo.User;
import com.zcf.service.GameteaServiceImpl;
import com.zcf.vo.out.LayuiJson;

@CrossOrigin
@Controller
@RequestMapping("/gametea")
public class GameteaController {

	@Autowired
	GameteaServiceImpl gs;
	/**
	 * 后台获取元帅茶苑
	 * @return
	 */
	@PostMapping("/getrooms")
	@ResponseBody
	public LayuiJson getrooms(RoomsParam param){
		return gs.getRooms(param);
	}
	/**
	 * 添加元帅茶苑
	 * @param gametea
	 * @return
	 */
	@PostMapping("/addgame")
	@ResponseBody
	public Body addgame(Gametea gametea){
		return gs.addgame(gametea);
	}
	
	
	/**
	 * 删除元帅茶苑
	 * @param gametea
	 * @return
	 */
	@PostMapping("/delroom")
	@ResponseBody
	public Body delroom(Gametea gametea){
		return gs.delroom(gametea);
	}
 
}
